
using Qdb;
using Qdb.CS.Config;

namespace Qdb.CS.Config
{
	/// <summary>factory to open C/S server and client implementations.</summary>
	/// <remarks>factory to open C/S server and client implementations.</remarks>
	/// <seealso cref="QdbFactory.OpenClient(Qdb.Config.IConfiguration, string, int, string, string)
	/// 	">QdbFactory.OpenClient(Qdb.Config.IConfiguration, string, int, string, string)
	/// 	</seealso>
	/// <seealso cref="QdbFactory.OpenServer(Qdb.Config.IConfiguration, string, int)
	/// 	"></seealso>
	public interface IClientServerFactory
	{
		/// <exception cref="Qdb.Ext.QdbIOException"></exception>
		/// <exception cref="Qdb.Ext.OldFormatException"></exception>
		/// <exception cref="Qdb.Ext.InvalidPasswordException"></exception>
		IObjectContainer OpenClient(IClientConfiguration config, string hostName, int port
			, string user, string password);

		/// <exception cref="Qdb.Ext.QdbIOException"></exception>
		/// <exception cref="Qdb.Ext.IncompatibleFileFormatException"></exception>
		/// <exception cref="Qdb.Ext.OldFormatException"></exception>
		/// <exception cref="Qdb.Ext.DatabaseFileLockedException"></exception>
		/// <exception cref="Qdb.Ext.DatabaseReadOnlyException"></exception>
		IObjectServer OpenServer(IServerConfiguration config, string databaseFileName, int
			 port);
	}
}
